{template 'common/header'}
<ul class="nav nav-tabs">
    <li {if $op == 'display'} class="active"{/if}><a href="{php echo $this->createWebUrl('cardlog', array('op' => 'display'))}">日志</a></li>
    <li {if $op == 'receivecard'} class="active"{/if}><a href="{php echo $this->createWebUrl('cardlog', array('op' => 'receivecard'))}">领卡日志</a></li>
    <li {if $op == 'delcard'} class="active"{/if}><a href="{php echo $this->createWebUrl('cardlog', array('op' => 'delcard'))}">删卡日志</a></li>
</ul>
<style>
    .label{line-height: 2}
    .danger{position: relative}
</style>

<div class="panel panel-info">
    <div class="panel-heading">筛选</div>
    <div class="panel-body">
        <form action="./index.php" method="get" class="form-horizontal" role="form" id="form">
            <input type="hidden" name="c" value="site">
            <input type="hidden" name="a" value="entry">
            <input type="hidden" name="m" value="we7_coupon">
            <input type="hidden" name="do" value="cardmanage">
            <input type="hidden" name="token" value="{$_W['token']}">
            <input type="hidden" name="status" value="{$status}">
            <input type="hidden" name="num" value="{$num}">
            <input type="hidden" name="endtime" value="{$endtime}">
            <div class="form-group">
                <label class="col-xs-12 col-sm-3 col-md-2 control-label">卡号</label>
                <div class="col-sm-8 col-xs-12">
                    <input type="text" class="form-control" name="cardsn" value="{$_GPC['cardsn']}" />
                </div>
            </div>
            <div class="form-group">
                <label class="col-xs-12 col-sm-3 col-md-2 control-label">姓名/手机号</label>
                <div class="col-sm-8 col-xs-12">
                    <input type="text" class="form-control" name="keyword" value="{$_GPC['keyword']}" />
                </div>
                <div class="pull-right col-xs-12 col-sm-3 col-md-2 col-lg-2">
                    <button class="btn btn-default"><i class="fa fa-search"></i> 搜索</button>
                </div>
            </div>
        </form>
    </div>
</div>
<div class="panel panel-default">
    <div class="panel-body table-responsive">
        <table class="table table-hover">
            <thead>
            <tr>
                <th width="150">id</th>
                <th width="150">会员卡名</th>
                <th width="150">开卡方式</th>
                <th width="150">会员卡Id</th>
                <th width="150">创建时间</th>
                <th width="250" class="text-right">操作</th>
            </tr>
            </thead>
            {loop $list $row}

            <tr {if $row['is_birth'] == 1}class="danger"{/if}>
            <td>{$row['id']}</td>
            <td>{$row['cardname']}</td>
            <td>{$row['create_method_name']}</td>
            <td>{$row['card_id']}</td>
            <td>{php echo date('Y-m-d', $row['create_time']);}</td>

            <td class="text-right">

                <div class="btn-group" style="margin-bottom: 5px">
                    <a href="{php echo $this->createWebUrl('editcard', array('op' => 'edit','cardId'=>$row['id']));}" title="编辑会员卡" class="btn btn-default">编辑会员卡</a>
                </div>

                <br>
                <!--<div class="btn-group">-->
                <!--<a class="btn btn-default" href="{php echo $this->createWebUrl('cardmanage', array('op' => 'delete', 'cardid' => $row['id']))}" onclick="return confirm('此操作不可恢复，确认删除？');return false;">删除</a>-->
                <!--<a class="btn btn-default" href="{php echo $this->createWebUrl('cardmanage', array('op' => 'record', 'uid' => $row['uid']))}">消费记录</a>-->
                <!--{if $setting['times_status'] == 1 || $setting['nums_status'] == 1}-->
                <!--<a class="btn btn-warning manage" href="javascript:;" data-uid="{$row['uid']}">充值/消费</a>-->
                <!--{/if}-->
                <!--</div>-->
            </td>
            </tr>
            {/loop}
        </table>
    </div>
</div>
